<?php


namespace App\Exceptions;

use App\Helper\ErrorCode;
use Throwable;

class ApiException extends \Exception
{
    public function __construct(int $code = 0, string $message = null, Throwable $previous = null)
    {
        empty($message) && $message = ErrorCode::$errorMessages[$code];
        parent::__construct($message, $code, $previous);
    }
}
